package org.jeecg.modules.sms.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.sms.entity.KjjSms;
import org.jeecg.modules.sms.entity.SmsListParms;
import org.jeecg.modules.sms.service.SmsSservice;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "sms")
@Api(tags = "科技局短信平台接口")
public class SmsController {

    @Resource
    private SmsSservice smsSservice;

    @RequestMapping(value = "/addSms",method = {RequestMethod.POST,RequestMethod.GET})
    @ApiOperation(value = "添加短信发送申请")
    public Result addSms(
            @RequestParam(value = "sms",required = true)KjjSms sms

    ){
        return smsSservice.addSms(sms);
    }

    @RequestMapping(value = "/getSmsList",method = {RequestMethod.POST,RequestMethod.GET})
    @ApiOperation(value = "获取短信申请列表0")
    public Result getSmsList(
            @RequestParam(value = "parms",required = true) SmsListParms parms
    ){
        return smsSservice.getSmsList(parms);
    }

}
